Classic DFFS Admin — Installation
=================================

The admin tool is delivered the same way as Classic DFFS: as un-compiled (minified) code
in a SharePoint document library. There is NO compiled app package. It runs on SharePoint
on-premises (2013 and later). For SharePoint Online, use Modern DFFS Admin.

Where the tool runs from
------------------------
Like the DFFS installer, the tool can run from two places. Where you upload it decides where
it reads the license and which DFFS package "Activate DFFS" uses:

  This site      <site>/SPJS/DFFSAdmin/  on a site that has DFFS in its own SPJS library.
                 License: that site's DFFS license (loader/DFFS_Loader_v2.html, else the
                 DFFS_License item in the site's DFFS config list).
                 Needs: Professional with the Classic DFFS Admin tool add-on, or Enterprise.

  Central site   /sites/ClassicDFFS_Central/SPJS/DFFSAdmin/
                 License: the DFFS_License item in the central site's DFFS_Settings list.
                 Needs: Enterprise (or Professional with the add-on, when the license lists
                 the site collections).

The tool can only manage the site collections the license covers. Change site, the Promote
target and the Copy list destination are refused for other site collections.

1. Upload the DFFSAdmin folder (the contents of this download) to the SPJS library of
   the site you chose - for example  <site>/SPJS/DFFSAdmin/  or
   /sites/ClassicDFFS_Central/SPJS/DFFSAdmin/.

   For "This site", DFFS must already be set up in that site's SPJS library with the
   DFFS installer (the installer's setup writes the license into
   /SPJS/DFFS/loader/DFFS_Loader_v2.html).

2. Create a Web Part page and add a Content Editor Web Part (CEWP). Then either:

   a) Link the tool directly: set the CEWP "Content Link" to
          <site>/SPJS/DFFSAdmin/DFFSAdmin.html
      (or /sites/ClassicDFFS_Central/SPJS/DFFSAdmin/DFFSAdmin.html for the central site).
      Where the file is linked from decides the mode - a site's own SPJS library means
      "This site", the central site's means "Central site".

   b) Or use the installer: set the CEWP "Content Link" to
          <site>/SPJS/DFFSAdmin/installer/DFFSAdmin_Installer.html
      Open the page. The installer shows "This site" and "Central site", what was found in
      each (the tool files, the DFFS package, a license code) and the license each needs.
      Pick one and click "Add the admin tool to this page". The installer changes this web
      part's Content Link to the chosen DFFSAdmin.html (no file is changed) and the page
      reloads with the tool. To change the choice later, edit the web part's Content Link.

   Either way:
     - Use the Content Link field - do not paste the HTML into the web part (the tool then
       can't tell which folder it runs from; see adminPath under Paths below).
     - Keep the file name DFFSAdmin.html.

3. The tool checks your Manage Lists permission on the site, then validates the license.
   An active tier trial counts; the DFFS 30-day trial does not unlock the tool.
   Use "Change site" in the tool's header to manage other sites the license covers.
   If the tool is locked or fails to start, its message points to the installer
   (installer/DFFSAdmin_Installer.html) - link the web part to it to see what is found where.

Paths
-----
DFFSAdmin.html reads the Content Link of its own web part to find the folder it was loaded
from. It loads jQuery and nacl from the DFFS package of the same site (the central site's in
central mode).

If your central site has another URL, change centralUrl in the dffsAdminConfig block at the
top of DFFSAdmin.html and at the top of installer/DFFSAdmin_Installer.html. It must match
dffs_central_site_url in the DFFS package's loader/DFFS_loader_v5.html.

Set adminPath (the tool's folder) and dffsPath (the DFFS package) in dffsAdminConfig only if
the tool can't read its web part, for example when the HTML is pasted into the web part
instead of linked.

License
-------
The tool reads the license but never edits it. Enter or change the license in the DFFS
installer (This site) or in the central site's DFFS_Settings list (Central site).
